.subckt NAND4X3 A B C D Z vcc gnd
MP1 1 A vcc vcc PMOS l=0.06 w=0.28
MP2 1 B vcc vcc PMOS l=0.06 w=0.28
MP3 2 1 vcc vcc PMOS l=0.06 w=0.55
MP4 2 3 Z vcc PMOS l=0.06 w=0.55
MP5 vcc C 3 vcc PMOS l=0.06 w=0.28
MP6 vcc D 3 vcc PMOS l=0.06 w=0.28
MN1 1 B 4 gnd NMOS l=0.06 w=0.20
MN2 4 A gnd gnd NMOS l=0.06 w=0.20
MN3 Z 3 gnd gnd NMOS l=0.06 w=0.320
MN4 Z 1 gnd gnd NMOS l=0.06 w=0.320
MN5 3 D 5 gnd NMOS l=0.06 w=0.20
MN5 5 C gnd gnd NMOS l=0.06 w=0.20
.ends NAND4X3